function input_change(obj){
    if($(obj).val()!=''){
        $(obj).next().animate({
            opacity:0
        },200);
    }else{
        $(obj).next().animate({
            opacity:1
        },200);
    }
}

function mycarousel_initCallback(carousel){
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
    //$(".jcarousel-item-3 .home-featured-image").addClass("hf-center");
}

$(document).ready(function(){
    $('#change_to_register').click(function(){
        $('#login-form').fadeOut(function(){
            $('#register-form').fadeIn();
        });
    });
    $('#change_to_login').click(function(){
        $('#register-form').fadeOut(function(){
            $('#login-form').fadeIn();
        });
    });
    jQuery('#featured-caraousel').jcarousel({
        auto: 2,
        wrap: 'circular',
        scroll: 1,
        visible:5,
        initCallback: mycarousel_initCallback
    });
    $('.jcarousel-item').hover(function(){
        $(".hf-center").removeClass("hf-center");
        $(this).addClass("hf-center");
    },function () {
        $(".hf-center").removeClass("hf-center");
    }
    );
});